#include <iostream>
#include "Factory.h"
#include "Product.h"

using namespace std;

int main( int argc, char* argv[] )
{
	Factory* facA = new ConcreteFactoryA();
	Factory* facB = new ConcreteFactoryB();

	ConcreteProductA* pA = dynamic_cast<ConcreteProductA*>(facA->CreateProduct());
	ConcreteProductB* pB = dynamic_cast<ConcreteProductB*>(facB->CreateProduct());

	delete facA;
	delete facB;
	delete pA;
	delete pB;

	return 0;
}